Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refurb] Implement read-whole-file [FURB101] #7682

Merged
merged 4 commits into from
Oct 20, 2023

Conversation

SavchenkoValeriy
Copy link
Contributor

Summary

This PR is part of a bigger effort of re-implementing refurb rules #1348. It adds support for FURB101

Test Plan

I included a new test + checked that all other tests pass.

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 27, 2023

CodSpeed Performance Report

Merging #7682 will not alter performance

Comparing SavchenkoValeriy:refurb/furb101 (87ea08d) with main (f158536)

Summary

✅ 25 untouched benchmarks

@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

@SavchenkoValeriy
Copy link
Contributor Author

Hey @charliermarsh 👋 Do you mind taking a look at this PR? Thanks! 🙏
PS I think that the performance test failure is a flake

@charliermarsh
Copy link
Member

Sorry, this is absolutely on my list, it's just a big rule implementation so trying to find time to focus on it.

@SavchenkoValeriy
Copy link
Contributor Author

@charliermarsh a gentle ping

@charliermarsh
Copy link
Member

@SavchenkoValeriy - Sorry for the delay, reading now!

@SavchenkoValeriy
Copy link
Contributor Author

Oh, really nice catch with argument unpacking! ❤️

@charliermarsh
Copy link
Member

@SavchenkoValeriy - I think there are a few cases we could catch, but it felt like it didn't merit the complexity budget.

@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Oct 20, 2023
@charliermarsh charliermarsh enabled auto-merge (squash) October 20, 2023 16:16
@charliermarsh
Copy link
Member

Excellent work @SavchenkoValeriy

@charliermarsh charliermarsh merged commit bc49492 into astral-sh:main Oct 20, 2023
15 checks passed
@SavchenkoValeriy SavchenkoValeriy deleted the refurb/furb101 branch October 20, 2023 16:29
dhruvmanila added a commit that referenced this pull request Apr 11, 2024
## Summary

Implement `write-whole-file` (`FURB103`), part of #1348. This is largely
a copy and paste of `read-whole-file` #7682.

## Test Plan

Text fixture added.

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Glyphack pushed a commit to Glyphack/ruff that referenced this pull request Apr 12, 2024
## Summary

Implement `write-whole-file` (`FURB103`), part of astral-sh#1348. This is largely
a copy and paste of `read-whole-file` astral-sh#7682.

## Test Plan

Text fixture added.

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants